# Contributor: Maxim Karasev <mxkrsv@disroot.org>
# Maintainer: John Vogel <jvogel@stygian.me>
maintainer="John Vogel <jvogel@stygian.me>"
pkgname=nvim-treesitter
pkgver=0.9.3
pkgrel=0
pkgdesc="nvim treesitter configurations and abstraction layer"
url="https://github.com/nvim-treesitter/nvim-treesitter/"
arch="noarch"
license="Apache-2.0"
subpackages="$pkgname-doc"
source="https://github.com/nvim-treesitter/nvim-treesitter/archive/refs/tags/v$pkgver/vim-treesitter-$pkgver.tar.gz"
depends="neovim"
options="!check" # requires entire neovim tree

package() {
	install -dm755 "$pkgdir"/usr/share/nvim/site/pack/dist/start/"$pkgname"
	cp -a autoload doc lua plugin queries \
		"$pkgdir"/usr/share/nvim/site/pack/dist/start/"$pkgname"
	install -Dm644 LICENSE ./*.md -t "$pkgdir"/usr/share/doc/"$pkgname"
}

doc() {
	default_doc
	amove usr/share/nvim/site/pack/dist/start/"$pkgname"/doc
}

sha512sums="
ee18f9e68f6432d93ee5231807366fcbdf42424b885e16164c864b6849b0142c275387e503b92079f4f8158b534dfd074795d976b42957cc7c12f22978ed9f4b  vim-treesitter-0.9.3.tar.gz
"
